<?php
/**
 * ExaminationType Service.
 * User: Administrator
 * Date: 2020/2/13 0013
 * Time: 下午 2:02
 */
namespace app\api\service\curriculum;

use app\api\model\curriculum\Curriculum as CurriculumModels;

Class Curriculum {

    /**
     * 根据类型获取考试类型
     * @param int $type
     *
     */
    public function category( int $type )
    {
        return CurriculumModels::with(['teacher'=>function($query){
            $query->field('head_url');
        }])->category($type)->select()->append(['type_text']);
    }

}